module WPSpider
  module Importer
   
    #
    # WPPageVO cass.
    #
    class WPPageVO
      # Page name.
      attr_reader :name
      # Page size.
      attr_reader :size

      #
      # Constructor.
      # - name: Page name.
      # - size: Page size.
      # - words: Words included by page.
      #
      def initialize(name, size, words=[])
        @name = name
        @size = size
        @words = words.uniq()
      end
      
      #
      # Words.
      #
      def words()
        return @words
      end
      
      #
      # Adds word.
      #
      def add_word(word)
        @words.add(word)
        @words.uniq!()
      end
    end
  end
end
